<script setup lang="ts">
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
import HelloWorld from "./components/HelloWorld.vue";

const selectedValue = ref("CN03");

const options = [
  {
    label: "中国",
    value: "CN",
    children: [
      {
        label: "青岛工厂",
        value: "CN03",
      },
      {
        label: "上海工厂",
        value: "CN01",
      },
    ],
  },
  {
    label: "日本",
    value: "JP",
    children: [
      {
        label: "仙台工厂",
        value: "JP03",
      },
      {
        label: "大阪工厂",
        value: "JP01",
      },
    ],
  },
];
</script>

<template>
  <div>
    <a href="https://vitejs.dev" target="_blank">
      <img src="/vite.svg" class="logo" alt="Vite logo" />
    </a>
    <a href="https://vuejs.org/" target="_blank">
      <img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
    </a>
  </div>
  <HelloWorld msg="Vite + Vue" />

  <n-cascader
    v-model:value="selectedValue"
    :options="options"
    :show-path="false"
    :filterable="true"
    expandTrigger="click"
    checkStrategy="child"
  ></n-cascader>
  <n-input :value="selectedValue" :disabled="true" />
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
